using System;
using FluentNHibernate.Automapping.Alterations;
using Framework.Core;

namespace Framework.Repository.Conventions
{
    static class AutoMappingHelper
    {
        public static bool IsSubClass(Type t)
        {
            return t.HasCustomAttribute<SubClassAttribute>();
        }

        public static bool IsEntity(Type t)
        {
            return t.HasCustomAttribute<EntityAttribute>();
        }

        public static bool IsAutoMappingOverrideType(Type t)
        {
            return typeof(IAutoMappingOverride<>).IsAssignableFromGenericType(t);
        }
    }
}